package com.witframework.util;



/**
 * @author wuxinyang
 *
 */
public class TreeSerialGenerator {
	private int[] bits={6,7,7,7,7,7,7,7,7};
	public TreeSerialGenerator(){

	}
	public long next(){
		return Long.parseLong(generateUID());
	}

	public String generateUID(){
		// delgate
        long id = new Long( new java.text.SimpleDateFormat( "yyMMddHHmmss" ).format( java.util.Calendar.getInstance().getTime() ) ).longValue();
        id += new java.rmi.server.UID().toString().hashCode();
        return( String.valueOf( id ) );
	}
	public static void main(String[] s){
		TreeSerialGenerator app=new TreeSerialGenerator();
		int i=0;
		while(i<10000){
			System.out.println(app.next());
			i++;
		}
	}
}
